Simulation of block diagrams is an important tool in the analysis of engineering systems. Simulation enables the studying of system behavior, the automatic performing of optimizations, and the evaluation of system analysis algorithms, among other uses. In many cases, engineered systems are operated in a pseudo steady state while more dynamic behavior is only present (and even permitted) in transitional stages. For example, after a distinct start-up phase, a cooling system runs at a given operating point. Similarly, aircraft are operated in cruise, a pseudo steady state, for extended periods of time, and transistors are typically biased to operate at a (near) linear part of their performance characteristic.
Various classes of block diagrams describe computations that can be performed on application specific computational hardware, such as a computer, microcontroller, FPGA, and custom hardware. Classes of such block diagrams include time-based block diagrams such as those found within Simulink® from the MathWorks, Inc. of Natick Mass., state-based and flow diagrams such as those found within Stateflow® from the MathWorks, Inc. and data-flow diagrams. A common characteristic among these various forms of block diagrams is that they define semantics on how to execute the diagram.
Historically, engineers and scientists have utilized time-based block diagram models in numerous scientific areas such as Feedback Control Theory and Signal Processing to study, design, debug, and refine dynamic systems. Dynamic systems, which are characterized by the fact that their behaviors change over time, are representative of many real-world systems. Time-based block diagram modeling has become particularly attractive over the last few years with the advent of software packages such as Simulink from The MathWorks, Inc. Such packages provide sophisticated software platforms with a rich suite of support tools that makes the analysis and design of dynamic systems efficient, methodical, and cost-effective.
A dynamic system (either natural or man-made) is a system whose response at any given time is a function of its input stimuli, its current state, and the current time. Such systems range from simple to highly complex systems. Physical dynamic systems include a falling body, the rotation of the earth, bio-mechanical systems (muscles, joints, etc.), bio-chemical systems (gene expression, protein pathways), weather and climate pattern systems, etc. Examples of man-made or engineered dynamic systems include: a bouncing ball, a spring with a mass tied on an end, automobiles, airplanes, control systems in major appliances, communication networks, audio signal processing, nuclear reactors, a stock market, etc. Professionals from diverse areas such as engineering, science, education, and economics build mathematical models of dynamic systems in order to better understand system behavior as it changes with the progression of time. The mathematical models aid in building “better” systems, where “better” may be defined in terms of a variety of performance measures such as quality, time-to-market, cost, speed, size, power consumption, robustness, etc. The mathematical models also aid in analyzing, debugging and repairing existing systems (be it the human body or the anti-lock braking system in a car). The models may also serve an educational purpose of educating others on the basic principles governing physical systems. The models and results are often used as a scientific communication medium between humans. The term “model-based design” is used to refer to the use of block diagram models in the development, analysis, and validation of dynamic systems.
For efficient analyses, it is important to be able to initialize the system at its steady state, the point of normal operating equilibrium. For example, to study behavior of a cooling system when faults such as pipe blockages occur, if the system can be set to its steady state immediately, the lengthy process of simulating the start-up behavior can be eliminated. Given the state vector values in steady state, a manifold of perturbation analyses can be quickly performed. This is critical in many applications. For example, in doing fault detection and isolation, it is assumed the system is operating at its nominal, steady state, operating point. Any deviations from this indicate failure and depending on the particular behavior of the deviation, the specific failure (i.e., which component is faulty) can be identified. To study and analyze the effectiveness of the diagnosis engine, it is required to perform many perturbation studies from the nominal behavior, which is often steady state.
System design and analysis is thus in many cases a process of two distinct stages: one concerns the transitional phase and the other the pseudo steady state phase. The latter of these has its own set of models and methods for design and analysis. Often times, these models include linearized dynamics around the operating point (‘small signal models’) to facilitate, e.g., perturbation analyses. Note that steady state may also be a periodic behavior with a given frequency.
At present, to study perturbations from a steady state of a system, the system is first simulated till it has reached a point in time where its state variables are stationary. Once steady state is reached, the system state is saved. Studies from steady state can now be executed by first loading the state variable values, without the need to go through the (possibly lengthy) transient behavior. This state can now be restored an arbitrary number of times, e.g., allowing the study of deviations when failures occur.
Unfortunately, this design scenario may fail in some situations where the simulation of a system includes more persistent variables than just the mathematical state. Most prominently, the solver that is used to generate simulation trajectories from differential equations contains a history of integration points, timing information, dynamically changed step size, etc., that needs to be restored in order to generate accurate reproduction of an otherwise uninterrupted simulation. Even if only one persistent variable is not saved and restored, this discrepancy can become arbitrarily large as a small deviation of the initial conditions can lead to grossly different behavior.
The same issues regarding the saving of persistent variables that are present during the simulation of block diagrams are also present during non-simulation execution of block diagrams. For example, graphical data flow programming (i.e., data flow diagrams) enables the visualization of mathematical operations on data. Often, the execution of such visualizations is based on token exchange. Again, executions can be run until a point of interest is reached from which it is possible to continue at a later time or from which several perturbation executions are initiated. This again requires storing all persistent variables in order to avoid discrepancies between an uninterrupted and a continued execution.